package com.cauli.file.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cauli.file.model.dto.file.FileQueryDTO;
import com.cauli.file.model.entity.UserFile;
import com.cauli.file.model.vo.file.FileListVO;

import java.util.List;

/**
 * @author Cauli
 * @date 2023-03-20 12:00
 * @description 用户文件 服务类
 */
public interface UserFileService extends IService<UserFile> {
    List<UserFile> selectUserFileByNameAndPath(String fileName, String filePath, Long userId);

    List<UserFile> selectSameUserFile(String fileName, String filePath, String extendName, Long userId);

    IPage<FileListVO> userFileList(FileQueryDTO fileQueryDTO);

    void updateFilepathByUserFileId(Long userFileId, String newFilePath, Long userId);

    void userFileCopy(Long userId, Long userFileId, String newFilePath);

    IPage<FileListVO> getFileByFileType(Long userId,FileQueryDTO fileQueryDTO);

    List<UserFile> selectUserFileListByPath(String filePath, Long userId);

    List<UserFile> selectFilePathTreeByUserId(Long userId);

    void deleteUserFile(Long userFileId, Long userId);

    List<UserFile> selectUserFileByLikeRightFilePath(String filePath, Long userId);
}
